﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using TaxiCaosSOAPService.Persistencia;
using TaxiCaosSOAPService.Dominio;

namespace TaxiCaosSOAPService
{
    public class Pagos : IPagos
    {
        private PagoDAO pagoDAO = new PagoDAO();

        private PagoDAO PagoDAO
        {
            get
            {
                if (pagoDAO == null)
                    pagoDAO = new PagoDAO();

                return pagoDAO;
            }
        }

        public int RegistrarPago(string banco, string ctabancaria, string moneda, string monto)
        {
            try
            {
                int nuevoID = PagoDAO.ObtenerNuevoIDPago();
                return PagoDAO.RegistrarPago(nuevoID, banco, ctabancaria, moneda, monto);

            }
            catch (Exception ex)
            {
                return 0;
            }
        }


        

    }
}
